<?php
/* @var $this ServiceController */
/* @var $model Service */
/* @var $form CActiveForm */
?>
<!--start div content-->
<div class="body-cont">
  <div class="col-9 row">
        <div class="mod">
        <div class="mod-bread"><a href="#">Trang chủ </a> > <a href="#">Dịch vụ</a> > <a href="#">Tạo dịch vụ</a></div>
        <div class="pro-tit line-dot" style="height: 100px;">
            	<h1> Điền thông tin cho dự án của bạn
                    <b class="social-top">
                    </b>   
                </h1>
            </div>
            
                <div class="form" style="padding-left: 10px; padding-right: 20px;">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'service-form',
	'enableAjaxValidation'=>false,
    'htmlOptions'=>array (
        'enctype'=>'multipart/form-data',
    ),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textArea($model,'name',array('size'=>50,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'servicetype'); ?>
		<?php echo $form->dropDownList($model,'servicetype',CreateService::getJobType()); ?>
		<?php echo $form->error($model,'servicetype'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'money (VNĐ)'); ?>
            <?php
                $this->widget('application.extensions.moneymask.MMask',array(
                    'element'=>'#Service_money,#total',
                    'currency'=>'PHP',
                    'config'=>array(
                        'symbolStay'=>true,
                        'thousands'=>'.',
                        'decimal'=>',',
                        'precision'=>0,
                    )
                ));
 
                //echo CHtml::textField('price', '', array('id'=>'price'));
                echo $form->textField($model,'money');
        ?>
	   <?php echo $form->error($model,'money'); ?>
	</div>
    <div id="test"></div>
   
    
   	<div class="row">
		<?php echo $form->labelEx($model,'contact'); ?>
		<?php echo $form->textArea($model,'contact',array('rows'=>5, 'cols'=>50)); ?>
		<?php echo $form->error($model,'contact'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'description'); ?>
		<?php echo $form->textArea($model,'description',array('rows'=>6, 'cols'=>70)); ?>
		<?php echo $form->error($model,'description'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'completiondate'); ?>
		<?php echo $form->textField($model,'completiondate'); ?>
		<?php echo $form->error($model,'completiondate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'keyword'); ?>
		<?php //echo $form->textField($model,'keyword',array('size'=>50,'maxlength'=>50)); 
			$this->widget('CAutoComplete', array(
			'model'=>$model,
			'attribute'=>'keyword',
			'url'=>array('create/suggestTags'),
			'multiple'=>true,
			'htmlOptions'=>array('size'=>50),
			));
		?>
		<?php echo $form->error($model,'keyword'); ?>
	</div>

	<div class="row">
		 <?php
                echo $form->labelEx($model,'image');
                echo Chtml::activeFileField($model, 'image');
                echo Chtml::error($model, 'image');
            ?>
	</div>
    


	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('id'=>"button_haha")); ?>
	<?php //echo CHtml::ajaxSubmitButton(Yii::t('forms','Tạo'),CHtml::normalizeUrl(array('create/index'),array('update'=>'#test'))); ?>

    </div>

<?php $this->endWidget(); ?>
</div><!-- form -->
</div>
</div>
</div>